# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=lxqt-notificationd
pkgver=2.0.1
pkgrel=0
pkgdesc="LXQt notification daemon"
url="https://github.com/lxqt/lxqt-notificationd"
arch="all !armhf" # armhf blocked by liblxqt and kwindowsystem
license="LGPL-2.0-or-later"
makedepends="
	cmake samurai lxqt-build-tools liblxqt-dev
	qt6-qttools-dev kwindowsystem-dev
	layer-shell-qt-dev
	"
options="!check" # No testsuite
subpackages="$pkgname-lang"
source="https://github.com/lxqt/lxqt-notificationd/releases/download/$pkgver/lxqt-notificationd-$pkgver.tar.xz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

lang() {
	install_if="lang $pkgname=$pkgver-r$pkgrel"
	amove usr/share/lxqt/translations/$pkgname
}

sha512sums="
c2a532e61129f09dde253f7499485f85088c19f8cc6f5ddfd1949eb9d43b142ee4f3f526b38a70fbe276623c1637398c70470f24bcdbb5597a499354e9840d67  lxqt-notificationd-2.0.1.tar.xz
"
